{extend name='main'}

{block name="button"}


<button class="layui-btn" data-submit-role  type='submit' onclick="$('form.mainForm').submit()">保存</button>
<button class="layui-btn layui-btn-danger" id='willback' type='button' >返回</button>


{/block}

{block name="content"}
<div class="think-box-shadow">
    <div class="layui-title">{if isset($vo.id) }编辑订单{else} 新增订单 {/if}</div>
    <form class="layui-form-type layui-form mainForm" data-auto="true" data-callback="submitCallback" >
        <div class="list layui-form-item">
            <div class="list-title"><span></span>基本信息</div>
            <div class="layui-row ">
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">订单号：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="code" lay-verify="" required placeholder="请输入订单号" autocomplete="off" value='{$vo.code|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">所属店铺：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="shop_id" class="layui-select" lay-search required lay-filter="swsf">
                                <option style="display: none" value="">请选择所属店铺</option>
                                {foreach $shop as $k=>$v}
				                {if (isset($vo.shop_id) and $vo.shop_id eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline layui-form-item ">
                        <label class="layui-form-label label-required-prev">下单日期：</label>
                        <div class="layui-input-inline  seller-inline-6">
                            <input data-date-input="" name="create_order_at" value="{$vo.create_order_at|default=""}" required
                            placeholder="请选择下单日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline layui-form-item ">
                        <label class="layui-form-label ">截止发货日期：</label>
                        <div class="layui-input-inline  seller-inline-6">
                            <input data-date-input="" name="delivery_at" value="{$vo.delivery_at|default=""}" 
                            placeholder="请选择截止发货日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">订单整理人：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="organizer" class="layui-select" lay-search  lay-filter="organizer">
                            	<option style="display: none" value="">请选择订单整理人</option>
                                {foreach $organizer as $k=>$v}
				                {if (isset($vo.organizer) and $vo.organizer eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">是否补发：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="reissue" class="layui-select" lay-search required lay-filter="reissue">
                            	<option style="display: none" value="">请选择是否补发</option>
                                {foreach $reissue as $k=>$v}
				                {if (isset($vo.reissue) and $vo.reissue eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <!--<div class="layui-col-md12 customer_update_box">
                    <div class="layui-inline ">
                        <label class="layui-form-label">客户信息：</label>
                        <div class="layui-input-inline seller-inline-11">
                            <textarea name="buyer_info" placeholder="" class="layui-textarea">{$vo.buyer_info|default=""}</textarea>
                        </div>
                    </div>
                </div>-->
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">订单状态：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="status" class="layui-select" lay-search required lay-filter="status">
                                {foreach $status as $k=>$v}
				                {if (isset($vo.status) and $vo.status eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 refund_amount_box" {if (isset($vo.id) and $vo.status eq 3)}  {else} style="display: none" {/if} >
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">退款金额：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="refund_amount" lay-verify="" required placeholder="请输入退款金额" autocomplete="off" value='{$vo.refund_amount|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div>  
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">是否加急：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="urgent" class="layui-select" lay-search required lay-filter="urgent">
                                {foreach $urgent as $k=>$v}
				                {if (isset($vo.urgent) and $vo.urgent eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">收货国家：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="receiving_country" lay-search class="layui-select" >
                            	<option style="display: none" value="">请选择收货国家</option>
                                {foreach $receiving_country as $k=>$v}
				                {if (isset($vo.receiving_country) and $vo.receiving_country eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>产品信息</div>
            <div class="layui-row ">                            
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">所属产品：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="product_id" class="layui-select" lay-search required lay-filter="product_id">
                                <option style="display: none" value="">请选择所属产品</option>
                                {foreach $product as $k=>$v}
				                {if (isset($vo.product_id) and $vo.product_id eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
	                <label class="layui-form-label abel-required-prev ">产品内容</label>
	                <div class="layui-input-block">
	                    <textarea id="content" name="content">{$vo.content|default=''|raw}</textarea>
	                </div>
	            </div>
	            <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">衣服类型：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="clothing" class="layui-select" lay-search  lay-filter="clothing">
                                <option style="display: none" value="">请选择衣服类型</option>
                                {foreach $clothing as $k=>$v}
				                {if (isset($vo.clothing) and $vo.clothing eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label">衣服颜色：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="clothing_color" class="layui-select" lay-search lay-filter="clothing_color">
                                <option style="display: none" value="">请选择衣服颜色</option>
                                {foreach $clothing_color as $k=>$v}
				                {if (isset($vo.clothing_color) and $vo.clothing_color eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label">衣服尺码：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="clothing_size" class="layui-select" lay-search lay-filter="clothing_size">
                                <option style="display: none" value="">请选择衣服尺码</option>
                                {foreach $clothing_size as $k=>$v}
				                {if (isset($vo.clothing_size) and $vo.clothing_size eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">胸（领）口：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="neckline" class="layui-select" >
                            	<option style="display: none" value="">请选择胸（领）口</option>
                                {foreach $neckline as $k=>$v}
				                {if (isset($vo.neckline) and $vo.neckline eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div> 
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">胸（领）口线色：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="chest_line_color" lay-search class="layui-select" >
                            	<option style="display: none" value="">请选择胸（领）口线色</option>
                                {foreach $chest_line_color as $k=>$v}
				                {if (isset($vo.chest_line_color) and $vo.chest_line_color eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">胸口图片：</label>
                        <div class="layui-input-inline seller-inline-4">
                            <div class="chest_pic">
			                    <img alt="icon" style="height:200px; width: 200px;border: 1px solid #e6e6e6; display: block;" src="{$vo.chest_pic|default='__ROOT__/static/admin/img/upload.png'}"/>
			                    <input type="hidden" name="chest_pic" 
			                           value="{$vo.chest_pic|default=''}"
			                           class="layui-input">
			                    <span style="display: inline-block;padding-top: 20px;color: red">图片格式为jpg、jpeg、png</span>
			                  
			                    <div>
			                        <a class="margin-top-10 layui-btn think-form-group-right  layui-btn-normal" 
			                           data-type="jpg,png,jpeg" data-field="business_license" id='chest_pic'>上传图片</a>
			                    </div>
			                </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">袖口：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="sleeve" class="layui-select"  >
                            	<option style="display: none" value="">请选择袖口</option>
                                {foreach $sleeve as $k=>$v}
				                {if (isset($vo.sleeve) and $vo.sleeve eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div> 
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">袖口线色：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="sleeve_line_color" lay-search class="layui-select" >
                            	<option style="display: none" value="">请选择袖口线色</option>
                                {foreach $sleeve_line_color as $k=>$v}
				                {if (isset($vo.sleeve_line_color) and $vo.sleeve_line_color eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">心形线色：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="heart_color" lay-search class="layui-select" >
                            	<option style="display: none" value="">请选择心形线色</option>
                                {foreach $heart_color as $k=>$v}
				                {if (isset($vo.heart_color) and $vo.heart_color eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">爪子线色：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="claw_color" lay-search class="layui-select" >
                            	<option style="display: none" value="">请选爪子线色</option>
                                {foreach $claw_color as $k=>$v}
				                {if (isset($vo.claw_color) and $vo.claw_color eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">左袖口图片：</label>
                        <div class="layui-input-inline seller-inline-4">
                            <div class="sleeve_pic">
			                    <img alt="icon" style="height:200px; width: 200px;border: 1px solid #e6e6e6; display: block;" src="{$vo.sleeve_pic|default='__ROOT__/static/admin/img/upload.png'}"/>
			                    <input type="hidden" name="sleeve_pic" 
			                           value="{$vo.sleeve_pic|default=''}"
			                           class="layui-input">
			                    <span style="display: inline-block;padding-top: 20px;color: red">图片格式为jpg、jpeg、png</span>
			                  
			                    <div>
			                        <a class="margin-top-10 layui-btn think-form-group-right  layui-btn-normal" 
			                           data-type="jpg,png,jpeg" data-field="business_license" id='sleeve_pic'>上传图片</a>
			                    </div>
			                </div>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">右袖口图片：</label>
                        <div class="layui-input-inline seller-inline-4">
                            <div class="right_sleeve_pic">
			                    <img alt="icon" style="height:200px; width: 200px;border: 1px solid #e6e6e6; display: block;" src="{$vo.right_sleeve_pic|default='__ROOT__/static/admin/img/upload.png'}"/>
			                    <input type="hidden" name="right_sleeve_pic" 
			                           value="{$vo.right_sleeve_pic|default=''}"
			                           class="layui-input">
			                    <span style="display: inline-block;padding-top: 20px;color: red">图片格式为jpg、jpeg、png</span>
			                  
			                    <div>
			                        <a class="margin-top-10 layui-btn think-form-group-right  layui-btn-normal" 
			                           data-type="jpg,png,jpeg" data-field="business_license" id='right_sleeve_pic'>上传图片</a>
			                    </div>
			                </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>沟通信息</div>
            <div class="layui-row ">
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">画手：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="painter" class="layui-select" required lay-filter="painter">
                                {foreach $painter as $k=>$v}
				                {if (isset($vo.painter) and $vo.painter eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 send_painter_at_box" {if (isset($vo.id) and in_array($vo.painter,[3,7,8]))}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label ">发画手日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="send_painter_at" value="{$vo.send_painter_at|default=""}" 
                            placeholder="请选择发画手日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 painter_name_box" {if (isset($vo.id) and in_array($vo.painter,[3,7,8]))}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label ">画手姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="painter_name" lay-search class="layui-select" >
                            	<option style="display: none" value="">请选择画手姓名</option>
                                {foreach $painter_name as $k=>$v}
				                {if (isset($vo.painter_name) and $vo.painter_name eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12 customer_update_box" {if (isset($vo.id) and $vo.painter eq 8)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">客户修改内容：</label>
                        <div class="layui-input-inline seller-inline-11">
                            <textarea name="customer_update" placeholder="" class="layui-textarea">{$vo.customer_update|default=""}</textarea>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 ">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">绘画日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="draw_at" value="{$vo.draw_at|default=""}" 
                            placeholder="请选择绘画日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">客服沟通情况：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="kefu_exchange" class="layui-select" required >
                                {foreach $kefu_exchange as $k=>$v}
				                {if (isset($vo.kefu_exchange) and $vo.kefu_exchange eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div> 
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">客户是否发图：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="custom_pic" class="layui-select" required >
                                {foreach $custom_pic as $k=>$v}
				                {if (isset($vo.custom_pic) and $vo.custom_pic eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>  
                <div class="layui-col-md4 ">
                    <div class="layui-inline ">
                        <label id="check_at"  {if (isset($vo.id) and in_array($vo.painter,[7,8]))} class="layui-form-label  label-required-prev"  {else}class="layui-form-label  "  {/if}>核对日期：</label>
                        <div  class="layui-input-inline seller-inline-6 "  >
                            <input data-date-input="" name="check_at" value="{$vo.check_at|default=""}" 
                            placeholder="请选择核对日期"  {if (isset($vo.id) and in_array($vo.painter,[7,8]))} required {/if}
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">是否给客户发邮件：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="is_sendemail" class="layui-select" required lay-filter="is_sendemail">
                                {foreach $is_sendemail as $k=>$v}
				                {if (isset($vo.is_sendemail) and $vo.is_sendemail eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 ">
                    <div class="layui-inline ">
                        <label id="sendemail_at"  {if (isset($vo.id) and $vo.is_sendemail eq 2)} class="layui-form-label  label-required-prev"  {else}class="layui-form-label  "  {/if}>发邮件日期：</label>
                        <div  class="layui-input-inline seller-inline-6 "  >
                            <input data-date-input="" name="sendemail_at" value="{$vo.sendemail_at|default=""}" 
                            placeholder="请选择发邮件日期"  {if (isset($vo.id) and $vo.is_sendemail eq 2)} required {/if}
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="list layui-form-item">
            <div class="list-title"><span></span>备注信息</div>
            <div class="layui-row ">
            	<div class="layui-col-md12">
                	<div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">制版备注：</label>
                        <div class="layui-input-inline seller-inline-11">
                            <textarea name="plate_desc" placeholder="" class="layui-textarea">{$vo.plate_desc|default=""}</textarea>
                        </div>
                   </div>
                </div>
                <div class="layui-col-md12">
                	<div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">刺绣/发货备注：</label>
                        <div class="layui-input-inline seller-inline-11">
                            <textarea name="desc" placeholder="" class="layui-textarea">{$vo.desc|default=""}</textarea>
                        </div>
                   </div>
                </div>
            </div>
        </div>
        <div class="list layui-form-item">
            <div class="list-title"><span></span>制版信息</div>
            <div class="layui-row ">                            
                <!--<div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">是否PS排版：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="is_ps" class="layui-select" required >
                                {foreach $is_ps as $k=>$v}
				                {if (isset($vo.is_ps) and $vo.is_ps eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>-->
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">制版状态：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="is_print" class="layui-select" required lay-filter="is_print">
                                {foreach $is_print as $k=>$v}
				                {if (isset($vo.is_print) and $vo.is_print eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 print_box" {if (isset($vo.id) and in_array($vo.is_print,[2,3]))}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">制版者姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="print_name" class="layui-select" lay-search required lay-filter="print_name">
                                {foreach $print_name as $k=>$v}
				                {if (isset($vo.print_name) and $vo.print_name eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 print_at_box" {if (isset($vo.id) and $vo.is_print eq 3)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">制版完成日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="print_end_at" value="{$vo.print_end_at|default=""}" required
                            placeholder="请选择制版完成日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4 print_box" {if (isset($vo.id) and in_array($vo.is_print,[2,3]))}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label">制版标记：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="number" name="print_mark" lay-verify=""  placeholder="请输入制版标记" autocomplete="off" value='{$vo.print_mark|default=0}'
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                
            </div>
        </div>
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>制作信息</div>
            <div class="layui-row ">    
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">制作情况：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="make_status" class="layui-select" required lay-filter="make_status">
                                {foreach $make_status as $k=>$v}
				                {if (isset($vo.make_status) and $vo.make_status eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                
                <div class="layui-col-md4 make_box" {if (isset($vo.id) and $vo.make_status eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">制作者姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="maker_name" class="layui-select" lay-search required lay-filter="maker_name">
                                {foreach $maker_name as $k=>$v}
				                {if (isset($vo.maker_name) and $vo.maker_name eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                
                <div class="layui-col-md4 make_box" {if (isset($vo.id) and $vo.make_status eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">制作完成日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="make_end_at" value="{$vo.make_end_at|default=""}" required
                            placeholder="请选择制作完成日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div> 
                
                <div class="layui-col-md4 make_plan_box" {if (isset($vo.id) and $vo.make_status eq 4)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">安排制作者姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <!--<input type="text" name="make_plan_name" lay-verify="" required placeholder="请输入安排制作者姓名" autocomplete="off" value='{$vo.make_plan_name|default=""}'
                                   class="layui-input">-->
                            <select name="make_plan_name" class="layui-select" lay-search required lay-filter="make_plan_name">
	                            {foreach $make_plan_name as $k=>$v}
				                {if (isset($vo.make_plan_name) and $vo.make_plan_name eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
	                        </select>
                        </div>
                    </div>
                </div>
                
                <div class="layui-col-md4 make_plan_box" {if (isset($vo.id) and $vo.make_status eq 4)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">安排制作日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="make_plan_at" value="{$vo.make_plan_at|default=""}" required
                            placeholder="请选择安排制作日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div> 
                
                
                <!--<div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">是否打印标签：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="print_label" class="layui-select" lay-filter="print_label">
                                {foreach $print_label as $k=>$v}
				                {if (isset($vo.print_label) and $vo.print_label eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div> -->
                <div class="layui-col-md4 ">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">整理日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="arrange_at" value="{$vo.arrange_at|default=""}" 
                            placeholder="请选择整理日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label">制作排单标记：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="screenshot" lay-verify=""  placeholder="请输入制作排单标记" autocomplete="off" value='{$vo.screenshot|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div>
              
            </div>
        </div>
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>质检信息</div>
            <div class="layui-row ">                            
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">是否质检：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="detection" class="layui-select" required lay-filter="detection">
                                {foreach $detection as $k=>$v}
				                {if (isset($vo.detection) and $vo.detection eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                
				<div class="layui-col-md4 detection_box" {if (isset($vo.id) and $vo.detection eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">质检人姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <!--<input type="text" name="detection_name" lay-verify="" required placeholder="请输入质检人姓名" autocomplete="off" value='{$vo.detection_name|default=""}'
                                   class="layui-input">-->
                            <select name="detection_name" class="layui-select" lay-search required lay-filter="detection_name">
                                {foreach $detection_name as $k=>$v}
				                {if (isset($vo.detection_name) and $vo.detection_name eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                
                <div class="layui-col-md4 detection_box" {if (isset($vo.id) and $vo.detection eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">质检日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="detection_at" value="{$vo.detection_at|default=""}" required
                            placeholder="请选择质检日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                             
            </div>
        </div>
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>打包信息</div>
            <div class="layui-row ">                            
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">打包状态：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="pack" class="layui-select" required lay-filter="pack">
                                {foreach $pack as $k=>$v}
				                {if (isset($vo.pack) and $vo.pack eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                
				<div class="layui-col-md4 pack_box" {if (isset($vo.id) and $vo.pack eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">打包者姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <!--<input type="text" name="pack_name" lay-verify="" required placeholder="请输入打包者姓名" autocomplete="off" value='{$vo.pack_name|default=""}'
                                   class="layui-input">-->
                            <select name="pack_name" class="layui-select" lay-search required lay-filter="pack_name">
	                            {foreach $pack_name as $k=>$v}
				                {if (isset($vo.pack_name) and $vo.pack_name eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
	                        </select>
                        </div>                       
                    </div>
                </div>
                
                <div class="layui-col-md4 pack_box" {if (isset($vo.id) and $vo.pack eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">打包日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="pack_at" value="{$vo.pack_at|default=""}" required
                            placeholder="请选择打包日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>                           
            </div>
        </div>
        
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>发货信息</div>
            <div class="layui-row ">              
                 
                
                
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">发货状态：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="delivery" class="layui-select" required lay-filter="delivery">
                                {foreach $delivery as $k=>$v}
				                {if (isset($vo.delivery) and $vo.delivery eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                
				<div class="layui-col-md4 delivery_box" {if (isset($vo.id) and $vo.delivery eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">发货人：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <!--<input type="text" name="delivery_name" lay-verify="" required placeholder="请输入发货人" autocomplete="off" value='{$vo.delivery_name|default=""}'
                                   class="layui-input">-->
                            <select name="delivery_name" class="layui-select" lay-search required lay-filter="delivery_name">
	                            {foreach $delivery_name as $k=>$v}
				                {if (isset($vo.delivery_name) and $vo.delivery_name eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
	                        </select>
                        </div>
                    </div>
                </div>
                
                <div class="layui-col-md4 delivery_box" {if (isset($vo.id) and $vo.delivery eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">发货日期：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input="" name="delivery_real_at" value="{$vo.delivery_real_at|default=""}" required
                            placeholder="请选择发货日期" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div> 
                
                
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">是否点发货：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="delivery_click" class="layui-select" required >
                                {foreach $delivery_click as $k=>$v}
				                {if (isset($vo.delivery_click) and $vo.delivery_click eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>                               
            </div>
        </div>
        
        <!--<div class="list layui-form-item">
            <div class="list-title"><span></span>耗损信息</div>
            <div class="layui-row ">                            
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">耗损状态：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="loss" class="layui-select" required lay-filter="loss">
                                {foreach $loss as $k=>$v}
				                {if (isset($vo.loss) and $vo.loss eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
                <div class="layui-col-md12 loss_box" {if (isset($vo.id) and $vo.loss eq 2)}  {else} style="display: none" {/if}>
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">耗损备注：</label>
                        <div class="layui-input-inline seller-inline-11">
                            <textarea name="loss_desc" placeholder="" class="layui-textarea">{$vo.loss_desc|default=""}</textarea>
                        </div>
                    </div>
                </div>               
            </div>
        </div>-->
        
        <!--<div class="list layui-form-item">
            <div class="list-title"><span></span>素材信息</div>
            <div class="layui-row ">                            
                <div class="layui-form-item">
	                <label class="layui-form-label abel-required-prev ">订单素材</label>
	                <div class="layui-input-block">
	                    <textarea id="material" name="material">{$vo.material|default=''|raw}</textarea>
	                </div>
	            </div>
                             
            </div>
        </div>-->
		
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>操作记录</div>
            <div class="layui-row ">
                <div class="layui-col-md12">
                    <div class="layui-inline " style="width: 100%">
                        <div class="layui-input-inline" style="width: 100%">
                            <div class="record">
                            	{notempty name='oplog'}
                            	{foreach $oplog as $k=>$v}
			                     	<p>{$v.create_at|format_datetime}&nbsp;&nbsp;&nbsp;&nbsp;{$v.nickname}&nbsp;&nbsp;&nbsp;&nbsp;{$v.content}</p>
			                    {/foreach}
			                    {/notempty}
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    </form>

</div>
{/block}

{block name="script"}
<script src="__ROOT__/static/admin/market/f-companyaudit.js"></script>
<script>
	layui.use('layer', function(){
	  var layer = layui.layer;
	  
	  $('#willback').on('click', function(){
	        layer.open({
	            title: '提示',
	            content: '返回将不会保存已修改信息，确定返回吗？',
	            btn: ['确认','取消'],
	            yes: function(index, layero){
	                //绑定确认按钮事件
	                layer.close(index);
	                window.history.back();
	                
	            }
	        });
	    });
	});
	
	layui.use('upload', function(){
            uplodImg('chest_pic');
            uplodImg('sleeve_pic');
            uplodImg('right_sleeve_pic');
            // uplodImg('image_mini');
            function uplodImg(id){
                var upload = layui.upload;
                var uploadInst = upload.render({
                    elem: '#'+id //绑定元素
                    ,url: "{:url('upload')}" //上传接口
                    ,accept:"images"
                    ,field:"image"
                    ,choose: function(obj){
                    	layer.load(); //上传loading
                    }
//                  ,before: function (obj) { // 图片上传回调
//								        obj.preview(function (index, picture, result) {
//								            $("."+id+' img').attr("src", result);
//								        });
//								    }
                    ,done: function(res){
                    //上传完毕回调
						layer.closeAll('loading'); //关闭loading
                        if(res.code == 1){                          
                            $('[name="'+id +'"]').val(res.data)
                            $("."+id+' img').attr('src',res.data)                          
                        }else{
                        	$.msg.error(res.info)
                        }
                    }
                    ,error: function(){
                    //请求异常回调
                    	layer.closeAll('loading'); //关闭loading
                    }
                });
            }   
      
        //执行实例
           
   
       
    });
	
	window.form.render();
    require(['ckeditor', 'angular'], function () {
        window.createEditor('[name="content"]', {height: 500});
        window.createEditor('[name="material"]', {height: 500});
    })
	
    form.on('select(account_type)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2){
            $("[name='master']").removeAttr("disabled").attr("required",'required');
            $(".masterTitle").addClass("label-required-prev")
          
        }else{
            $("[name='master']").attr("disabled",'disabled').removeAttr("required");
            $(".masterTitle").removeClass("label-required-prev")
            $("[name='master']").val("");
        }
        form.render();

    }); 
    
    form.on('select(status)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==3){
        	$(".refund_amount_box").show(); 
        	$("[name='refund_amount']").attr("required",'required');
        }else{
        	$(".refund_amount_box").hide();        	
            $("[name='refund_amount']").removeAttr("required");
            $("[name='refund_amount']").val("");
        }
        form.render();
    }); 
    
    form.on('select(product_id)', function(data){
      
        console.log(data.value); //得到被选中的值
        
        if(data.value){
            $.form.load('{:url("get_product")}', {product_id : data.value}, "post", function (ret) {
                if (ret.code === 1) {
                    var data = ret.data;
                    window.form.render();
				    require(['ckeditor', 'angular'], function () {	
				    	var editor = CKEDITOR.instances.content;    
				    	if(editor){
				    		editor.destroy(true);
				    	}
				    	if(data){
				    		window.createEditor('[name="content"]', {height: 500});
				        	CKEDITOR.instances.content.setData(data);
				    	}else{
				    		window.createEditor('[name="content"]', {height: 500});
				        	CKEDITOR.instances.content.setData("");
				    	}
				        
				        
				    })

                } else {
                    $.msg.auto(ret.info, 1)

                }
                form.render();
                return false;
            })
        }else{
            window.form.render();
		    require(['ckeditor', 'angular'], function () {	
		    	var editor = CKEDITOR.instances.content;    
		    	if(editor){
		    		editor.destroy(true);
		    	}
		        window.createEditor('[name="content"]', {height: 500});
		        CKEDITOR.instances.content.setData("");
		        
		    })
        }
 
        form.render();
    });
    
    form.on('select(painter)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==3 || data.value==6 ||data.value==7 || data.value==8){
        	$(".send_painter_at_box").show();
        	$(".painter_name_box").show();
        	if(data.value==7 || data.value==8){
        		$("[name='check_at']").attr("required",'required');
        		$("#check_at").attr("class",'label-required-prev layui-form-label');
        		if(data.value==8){
        			$(".customer_update_box").show();   
        			$("[name='customer_update']").attr("required",'required');
        		}
        	}else{
        		$(".customer_update_box").hide();        	
	            $("[name='customer_update']").removeAttr("required");
	            $("[name='customer_update']").val("");
	            $("[name='check_at']").removeAttr("required");
        		$("#check_at").removeClass('label-required-prev');
        	}
        }else{
        	$(".send_painter_at_box").hide();
        	$(".painter_name_box").hide();
            $("[name='send_painter_at']").val("");
            $("[name='painter_name']").val("");
            $(".customer_update_box").hide();        	
            $("[name='customer_update']").removeAttr("required");
            $("[name='customer_update']").val("");
            $("[name='check_at']").removeAttr("required");
        	$("#check_at").removeClass('label-required-prev');
        	
        }
        form.render();
    });
    form.on('select(is_sendemail)', function(data){    
        console.log(data.value); //得到被选中的值
        if(data.value==2){
        	$("[name='sendemail_at']").attr("required",'required');
        	$("#sendemail_at").attr("class",'label-required-prev layui-form-label');
        }else{
        	
            $("[name='sendemail_at']").removeAttr("required");
        	$("#sendemail_at").removeClass('label-required-prev');   	
        }
        form.render();
    });
    form.on('select(make_status)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2){
        	$(".make_plan_box").hide();
        	$(".make_box").show();     
        	$("[name='maker_name']").attr("required",'required');
        	$("[name='make_end_at']").attr("required",'required');
        	$("[name='make_plan_name']").removeAttr("required");
        	$("[name='make_plan_at']").removeAttr("required");
        	$("[name='make_plan_name']").val("");
            $("[name='make_plan_at']").val("");
        }else if(data.value==4){
        	$(".make_box").hide(); 
        	$(".make_plan_box").show(); 
        	$("[name='make_plan_name']").attr("required",'required');
        	$("[name='make_plan_at']").attr("required",'required');
            $("[name='maker_name']").removeAttr("required");
            $("[name='make_end_at']").removeAttr("required");
            $("[name='maker_name']").val("");
            $("[name='make_end_at']").val("");
        }else{
        	$(".make_box").hide(); 
        	$(".make_plan_box").hide();
        	$("[name='make_plan_name']").removeAttr("required");
        	$("[name='make_plan_at']").removeAttr("required");
        	$("[name='maker_name']").removeAttr("required");
            $("[name='make_end_at']").removeAttr("required");
            $("[name='make_plan_name']").val("");
            $("[name='make_plan_at']").val("");
            $("[name='maker_name']").val("");
            $("[name='make_end_at']").val("");
        }
        form.render();
    });
    form.on('select(detection)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2){
        	$(".detection_box").show();   
        	$("[name='detection_name']").attr("required",'required');
        	$("[name='detection_at']").attr("required",'required');    	
        }else{
        	$(".detection_box").hide();        	
            $("[name='detection_name']").removeAttr("required");
            $("[name='detection_name']").val("");
            $("[name='detection_at']").removeAttr("required");
            $("[name='detection_at']").val("");
        }
        form.render();
    });
    form.on('select(pack)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2){
        	$(".pack_box").show();    
        	$("[name='pack_name']").attr("required",'required');
        	$("[name='pack_at']").attr("required",'required'); 
        }else{
        	$(".pack_box").hide();        	
            $("[name='pack_name']").removeAttr("required");
            $("[name='pack_name']").val("");
            $("[name='pack_at']").removeAttr("required");
            $("[name='pack_at']").val("");
        }
        form.render();
    });
    form.on('select(delivery)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2){
        	$(".delivery_box").show(); 
        	$("[name='delivery_name']").attr("required",'required');
        	$("[name='delivery_real_at']").attr("required",'required'); 
        }else{
        	$(".delivery_box").hide();        	
            $("[name='delivery_name']").removeAttr("required");
            $("[name='delivery_name']").val("");
            $("[name='delivery_real_at']").removeAttr("required");
            $("[name='delivery_real_at']").val("");
        }
        form.render();
    });
    form.on('select(loss)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2){
        	$(".loss_box").show(); 
        	$("[name='loss_desc']").attr("required",'required');
        }else{
        	$(".loss_box").hide();        	
            $("[name='loss_desc']").removeAttr("required");
            $("[name='loss_desc']").val("");
        }
        form.render();
    });
    form.on('select(is_print)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2 || data.value==3){
        	$(".print_box").show(); 
        	$("[name='print_name']").attr("required",'required');
        	if(data.value==3){
        		$(".print_at_box").show(); 
        		$("[name='print_end_at']").attr("required",'required');
        	}else{
        		$(".print_at_box").hide();        	
	            $("[name='print_end_at']").removeAttr("required");
	            $("[name='print_end_at']").val("");
        	}
        }else{
        	$(".print_box").hide();        	
            $("[name='print_name']").removeAttr("required");
            $("[name='print_name']").val("");
            $(".print_at_box").hide();        	
            $("[name='print_end_at']").removeAttr("required");
            $("[name='print_end_at']").val("");
        }
        form.render();
    });
    
    form.render();
</script>

{/block}

{block name="style"}
<style>
    .label-required:after, .label-required-next:after{
        content: "";
    }
    .payBack {
        background: #ffecea;
        margin-bottom: 15px;
    }

    .payBack-title {
        padding-bottom: 10px;
        padding-top: 10px;
        padding-left: 20px;
        color: #FF3030;
    }

    .payBack-title span {
        display: inline-block;
        width: 3px;
        background: #FF3030;
        height: 14px;
        vertical-align: middle;
        margin-right: 15px;
        margin-top: -3px;
    }
</style>
{/block}